package com.tec.cloud.notice.web;

import com.tec.cloud.notice.service.NoticeService;
import com.tec.cloud.notice.vo.ConfigVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping("notice")
public class NoticeController {

    @Autowired
    private NoticeService noticeService;

    @GetMapping("text/{message}")
    public void textMessage(@PathVariable String message) {
        noticeService.sendTextMessage(message);
    }

    @GetMapping("markdown/{title}/{message}")
    public void get(@PathVariable("title") String title, @PathVariable("message") String message) {
        noticeService.sendMarkDownMessage(title, message);
    }
}
